{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "\n",
    "import torch \n",
    "import torch.nn as nn\n",
    "import torch.nn.functional as F\n",
    "\n",
    "from torchvision.models import alexnet"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "from data import VOT19\n",
    "vot = VOT19()\n",
    "video,boxes = vot.__getitem__(31)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "from gct import GCT\n",
    "gct = GCT(10)\n",
    "video2 = video[:30,:,:,:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "X torch.Size([1, 256, 11, 8]) Z torch.Size([10, 256, 11, 8])\n",
      "X torch.Size([1, 256, 88]) Z torch.Size([10, 256, 88])\n",
      "X^ torch.Size([1, 256, 88])\n",
      "A_1 torch.Size([880, 880]) \n",
      "V_1 torch.Size([1, 256, 88])\n",
      "V_x torch.Size([1, 256, 88])\n",
      "V_x torch.Size([1, 256, 88]) A_2 torch.Size([88, 88])\n",
      "V_2 torch.Size([1, 256, 88])\n"
     ]
    }
   ],
   "source": [
    "out = gct.forward(video2[25,:,:,:],video2[15:25,:,:,:])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "tensor([[[[548973.1875]]]], grad_fn=<MkldnnConvolutionBackward>)"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "out"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
